﻿using Common.Views;
using NUnit.Framework;
using Sanelib.DataView;

namespace IntegrationTests.ViewModel
{
    public class MemberViewRepositoryTester : IntegrationTestBase
    {
        [Test]
        public void ShouldRetrieveByPasswordToken()
        {
            var member = GetSiteUser();
            Persist(member);

            var repo = GetInstance<IViewRepository<MemberView>>();
            var name = repo.GetById(member.Id).Name;
            Assert.AreEqual(name, member.Name);
        }
    }
}